package com.effectivsocial.rest.service;
/**
 * 
 */


import java.util.List;
import lombok.AllArgsConstructor;
import org.springframework.social.twitter.api.DirectMessage;
import org.springframework.social.twitter.api.DirectMessageOperations;
import org.springframework.social.twitter.api.Twitter;

/**
 * @author Dhrubo
 *
 */
@AllArgsConstructor
public class TwitterDirectMessageOperationsService implements
		DirectMessageOperations {
	
	private Twitter twitter;


	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#deleteDirectMessage(long)
	 */
	public void deleteDirectMessage(long messageId) {
		twitter.directMessageOperations().deleteDirectMessage(messageId);

	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessage(long)
	 */
	public DirectMessage getDirectMessage(long id) {
		return twitter.directMessageOperations().getDirectMessage(id);
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessagesReceived()
	 */
	public List<DirectMessage> getDirectMessagesReceived() {
		return twitter.directMessageOperations().getDirectMessagesReceived();
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessagesReceived(int, int)
	 */
	public List<DirectMessage> getDirectMessagesReceived(int page, int pageSize) {
		return twitter.directMessageOperations().getDirectMessagesReceived(page, pageSize);
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessagesReceived(int, int, long, long)
	 */
	public List<DirectMessage> getDirectMessagesReceived(int page, int pageSize,
			long sinceId, long maxId) {
		return twitter.directMessageOperations().getDirectMessagesReceived(page, pageSize, sinceId, maxId);
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessagesSent()
	 */
	public List<DirectMessage> getDirectMessagesSent() {
		return twitter.directMessageOperations().getDirectMessagesSent();
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessagesSent(int, int)
	 */
	public List<DirectMessage> getDirectMessagesSent(int page, int pageSize) {
		return twitter.directMessageOperations().getDirectMessagesSent(page, pageSize);
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#getDirectMessagesSent(int, int, long, long)
	 */
	public List<DirectMessage> getDirectMessagesSent(int page, int pageSize,
			long sinceId, long maxId) {
		return twitter.directMessageOperations().getDirectMessagesSent(page, pageSize, sinceId, maxId);
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#sendDirectMessage(java.lang.String, java.lang.String)
	 */
	public DirectMessage sendDirectMessage(String toScreenName, String text) {
		return twitter.directMessageOperations().sendDirectMessage(toScreenName, text);
	}

	/* (non-Javadoc)
	 * @see org.springframework.social.twitter.api.DirectMessageOperations#sendDirectMessage(long, java.lang.String)
	 */
	public DirectMessage sendDirectMessage(long toUserId, String text) {
		return twitter.directMessageOperations().sendDirectMessage(toUserId, text);
	}

}
